package com.hui.entity.dao;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.hui.util.module.customizeserializer.BigDecimalSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 商品属性值表(StoreProductAttrValue)表实体类
 * 商品规格
 *
 * @author hui
 * @since 2022-07-17 11:40:42
 */
@SuppressWarnings("serial")
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("store_product_attr_value")
public class StoreProductAttrValue implements Serializable {

    @TableId
    private Long id;
    @ApiModelProperty("商品ID")
    private Long productId;
    @ApiModelProperty("商品属性索引值 (attr_value|attr_value[|....])")
    private String sku;
    @ApiModelProperty("属性对应的库存")
    private Integer stock;
    @ApiModelProperty("拼团库存属性对应的库存")
    private Integer pinkStock;
    @ApiModelProperty("秒杀库存属性对应的库存")
    private Integer seckillStock;
    @ApiModelProperty("销量")
    private Integer sales;
    @ApiModelProperty("属性金额")
    @JsonSerialize(
            using = BigDecimalSerializer.class
    )
    private BigDecimal price;
    @ApiModelProperty("拼团属性对应的金额")
    @JsonSerialize(
            using = BigDecimalSerializer.class
    )
    private BigDecimal pinkPrice;
    @ApiModelProperty("秒杀属性对应的金额")
    @JsonSerialize(
            using = BigDecimalSerializer.class
    )
    private BigDecimal seckillPrice;
    @ApiModelProperty("属性对应的图片")
    private String image;
    @TableField("`unique`")
    @ApiModelProperty("唯一值")
    private String unique;
    @ApiModelProperty("成本价")
    @JsonSerialize(
            using = BigDecimalSerializer.class
    )
    private BigDecimal cost;
    @ApiModelProperty("商品条码")
    private String barCode;
    @ApiModelProperty("原价")
    private BigDecimal otPrice;
    @ApiModelProperty("重量")
    private BigDecimal weight;
    @ApiModelProperty("体积")
    private BigDecimal volume;
    @ApiModelProperty("一级返佣")
    private BigDecimal brokerage;
    @ApiModelProperty("二级返佣")
    private BigDecimal brokerageTwo;
    @ApiModelProperty("所需多少积分兑换商品")
    private Integer integral;

}

